import CryptoJS from "crypto-js";
const key = CryptoJS.enc.Utf8.parse("GzSsyLingxi2.0.0");

export default (str: string) => {
    const message = CryptoJS.enc.Utf8.parse(str);
    const encrypted = CryptoJS.AES.encrypt(message, key, {
        mode: CryptoJS.mode.ECB,
        padding: CryptoJS.pad.Pkcs7,
    });
    return encrypted.toString(); // 加密后的base64
};
